﻿__author__ = 'Liantian'
# -*- coding: utf-8 -*-
from django.core.mail import send_mail
from django.core.mail import EmailMultiAlternatives
from django.conf import settings
from django.core.urlresolvers import reverse




def send_password_mail(username,email,password):
    url = reverse("geek-vpn-index",args=())
    host = settings.WEBSITE_HOST
    subject = "You GeekVPN password has been reset.‏"
    from_email = settings.EMAIL_HOST_USER
    to = email
    text_content =  '''
%s:

    We are sending this e-mail because we have received a request to reset the password for your Account

    Your new password : %s

    Signin url : %s%s

    Thanks,
    Mr. Geeklien


          ''' % (username,password,host,url)

    msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
    # msg.attach_alternative(html_content, "text/html")
    msg.send()







